<?php
namespace app\Admin\controller;
use think\Controller;
use app\Admin\model\Do_register;

    class Register extends Controller
    {
        public function index()
        {
            if(request()->isPost()){
                $do_register=new Do_register();
                $data=input('post.');
                $num=$do_register->index($data);
                if($num==1){
                    return redirect('login/index');
                }else{
                    $this->error('注册失败');
                }
            }
            return $this->fetch();
        }
    }

?>